package com.peas.platform.module.icims.budget.statistics.api;

import com.peas.platform.common.core.dto.ResponseDto;
import com.peas.platform.module.icims.budget.statistics.api.req.SaveDepartmentPerformance;
import com.peas.platform.module.icims.budget.statistics.service.DepartmentPerformanceService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@Api(tags = "自定义接口-[预算控制]部门绩效目标")
@RestController
@RequestMapping("/api/v1/customStatisticsDepartmentPerformance")
public class CustomStatisticsDepartmentPerformanceController {

    @Resource
    private DepartmentPerformanceService departmentPerformanceService;

    @PostMapping("/saveDepartmentPerformance")
    public ResponseDto<Boolean> saveDepartmentPerformance(@RequestBody @Valid SaveDepartmentPerformance vo) {
        departmentPerformanceService.saveDepartmentPerformance(vo);
        return ResponseDto.getSuccessResponseDto(true);
    }

}
